﻿using System;
using System.IO;
using SEXY;

namespace Studio
{
	// Token: 0x0200043C RID: 1084
	public class CharFileStatus
	{
		// Token: 0x06001AF2 RID: 6898 RVA: 0x000AB7D4 File Offset: 0x000A99D4
		public CharFileStatus()
		{
			this.showAccessory = new bool[10];
			this.siruLv = new byte[Enum.GetValues(typeof(CharDefine.SiruParts)).Length];
			this.clothesState = new byte[Enum.GetNames(typeof(CharDefine.ClothesStateKindFemale)).Length];
			this.MemberInitialize();
		}

		// Token: 0x1700029B RID: 667
		// (get) Token: 0x06001AF3 RID: 6899 RVA: 0x000AB89C File Offset: 0x000A9A9C
		// (set) Token: 0x06001AF4 RID: 6900 RVA: 0x000AB8A4 File Offset: 0x000A9AA4
		public byte[] siruLv
		{
			get
			{
				return this._siruLv;
			}
			private set
			{
				this._siruLv = value;
			}
		}

		// Token: 0x06001AF5 RID: 6901 RVA: 0x000AB8B0 File Offset: 0x000A9AB0
		protected void MemberInitialize()
		{
			for (int i = 0; i < this.clothesState.Length; i++)
			{
				this.clothesState[i] = 0;
			}
			for (int j = 0; j < this.showAccessory.Length; j++)
			{
				this.showAccessory[j] = true;
			}
			for (int k = 0; k < this.siruLv.Length; k++)
			{
				this.siruLv[k] = 0;
			}
			this.nipStand = 0f;
			this.hohoAkaRate = 0f;
			this.tearsLv = 0f;
			this.hideEyesHighlight = false;
			this.disableShapeBustL = false;
			this.disableShapeBustR = false;
			this.disableShapeNipL = false;
			this.disableShapeNipR = false;
		}

		// Token: 0x06001AF6 RID: 6902 RVA: 0x000AB968 File Offset: 0x000A9B68
		public void Save(BinaryWriter _bw)
		{
			_bw.Write((int)this.coordinateType);
			_bw.Write(10);
			for (int i = 0; i < this.showAccessory.Length; i++)
			{
				_bw.Write(this.showAccessory[i]);
			}
			_bw.Write(this.eyesPtn);
			_bw.Write(this.eyesOpen);
			_bw.Write(this.eyesOpenMin);
			_bw.Write(this.eyesOpenMax);
			_bw.Write(this.eyesFixed);
			_bw.Write(this.mouthPtn);
			_bw.Write(this.mouthOpen);
			_bw.Write(this.mouthOpenMin);
			_bw.Write(this.mouthOpenMax);
			_bw.Write(this.mouthFixed);
			_bw.Write(this.tongueState);
			_bw.Write(this.eyesLookPtn);
			_bw.Write(this.eyesTargetNo);
			_bw.Write(this.eyesTargetRate);
			_bw.Write(this.neckLookPtn);
			_bw.Write(this.neckTargetNo);
			_bw.Write(this.neckTargetRate);
			_bw.Write(this.eyesBlink);
			_bw.Write(this.disableShapeMouth);
			this.SaveSub(_bw);
			_bw.Write(this.name);
		}

		// Token: 0x06001AF7 RID: 6903 RVA: 0x000ABAA8 File Offset: 0x000A9CA8
		public void Load(BinaryReader _br, Version _version)
		{
			this.coordinateType = (CharDefine.CoordinateType)_br.ReadInt32();
			int num = _br.ReadInt32();
			for (int i = 0; i < num; i++)
			{
				this.showAccessory[i] = _br.ReadBoolean();
			}
			this.eyesPtn = _br.ReadInt32();
			this.eyesOpen = _br.ReadSingle();
			this.eyesOpenMin = _br.ReadSingle();
			this.eyesOpenMax = _br.ReadSingle();
			this.eyesFixed = _br.ReadSingle();
			this.mouthPtn = _br.ReadInt32();
			this.mouthOpen = _br.ReadSingle();
			this.mouthOpenMin = _br.ReadSingle();
			this.mouthOpenMax = _br.ReadSingle();
			this.mouthFixed = _br.ReadSingle();
			this.tongueState = _br.ReadByte();
			this.eyesLookPtn = _br.ReadInt32();
			this.eyesTargetNo = _br.ReadInt32();
			this.eyesTargetRate = _br.ReadSingle();
			this.neckLookPtn = _br.ReadInt32();
			this.neckTargetNo = _br.ReadInt32();
			this.neckTargetRate = _br.ReadSingle();
			this.eyesBlink = _br.ReadBoolean();
			this.disableShapeMouth = _br.ReadBoolean();
			this.LoadSub(_br, _version);
			if (_version.CompareTo(new Version(0, 1, 4)) >= 0)
			{
				this.name = _br.ReadString();
			}
		}

		// Token: 0x06001AF8 RID: 6904 RVA: 0x000ABBF4 File Offset: 0x000A9DF4
		protected void SaveSub(BinaryWriter bw)
		{
			bw.Write(this.clothesState.Length);
			for (int i = 0; i < this.clothesState.Length; i++)
			{
				bw.Write(this.clothesState[i]);
			}
			bw.Write(this.siruLv.Length);
			for (int j = 0; j < this.siruLv.Length; j++)
			{
				bw.Write(this.siruLv[j]);
			}
			bw.Write(this.nipStand);
			bw.Write(this.hohoAkaRate);
			bw.Write(this.tearsLv);
			bw.Write(this.disableShapeBustL);
			bw.Write(this.disableShapeBustR);
			bw.Write(this.disableShapeNipL);
			bw.Write(this.disableShapeNipR);
			bw.Write(this.hideEyesHighlight);
		}

		// Token: 0x06001AF9 RID: 6905 RVA: 0x000ABCCC File Offset: 0x000A9ECC
		protected void LoadSub(BinaryReader br, Version _version)
		{
			int num = br.ReadInt32();
			for (int i = 0; i < num; i++)
			{
				this.clothesState[i] = br.ReadByte();
			}
			num = br.ReadInt32();
			for (int j = 0; j < num; j++)
			{
				this.siruLv[j] = br.ReadByte();
			}
			this.nipStand = CharFile.ClampEx(br.ReadSingle(), 0f, 1f);
			this.hohoAkaRate = br.ReadSingle();
			this.tearsLv = br.ReadSingle();
			this.disableShapeBustL = br.ReadBoolean();
			this.disableShapeBustR = br.ReadBoolean();
			this.disableShapeNipL = br.ReadBoolean();
			this.disableShapeNipR = br.ReadBoolean();
			this.hideEyesHighlight = br.ReadBoolean();
		}

		// Token: 0x04001D96 RID: 7574
		public string name = "キャラ";

		// Token: 0x04001D97 RID: 7575
		public byte[] clothesState;

		// Token: 0x04001D98 RID: 7576
		public bool[] showAccessory;

		// Token: 0x04001D99 RID: 7577
		public CharDefine.CoordinateType coordinateType;

		// Token: 0x04001D9A RID: 7578
		public int eyesPtn;

		// Token: 0x04001D9B RID: 7579
		public float eyesOpen = 1f;

		// Token: 0x04001D9C RID: 7580
		public float eyesOpenMin;

		// Token: 0x04001D9D RID: 7581
		public float eyesOpenMax = 1f;

		// Token: 0x04001D9E RID: 7582
		public float eyesFixed = -1f;

		// Token: 0x04001D9F RID: 7583
		public int mouthPtn;

		// Token: 0x04001DA0 RID: 7584
		public float mouthOpen;

		// Token: 0x04001DA1 RID: 7585
		public float mouthOpenMin;

		// Token: 0x04001DA2 RID: 7586
		public float mouthOpenMax = 1f;

		// Token: 0x04001DA3 RID: 7587
		public float mouthFixed = -1f;

		// Token: 0x04001DA4 RID: 7588
		public byte tongueState;

		// Token: 0x04001DA5 RID: 7589
		public int eyesLookPtn;

		// Token: 0x04001DA6 RID: 7590
		public int eyesTargetNo;

		// Token: 0x04001DA7 RID: 7591
		public float eyesTargetRate = 1f;

		// Token: 0x04001DA8 RID: 7592
		public int neckLookPtn = 2;

		// Token: 0x04001DA9 RID: 7593
		public int neckTargetNo;

		// Token: 0x04001DAA RID: 7594
		public float neckTargetRate = 1f;

		// Token: 0x04001DAB RID: 7595
		public bool eyesBlink = true;

		// Token: 0x04001DAC RID: 7596
		public bool disableShapeMouth;

		// Token: 0x04001DAD RID: 7597
		private byte[] _siruLv;

		// Token: 0x04001DAE RID: 7598
		public float nipStand;

		// Token: 0x04001DAF RID: 7599
		public float hohoAkaRate;

		// Token: 0x04001DB0 RID: 7600
		public bool disableShapeBustL;

		// Token: 0x04001DB1 RID: 7601
		public bool disableShapeBustR;

		// Token: 0x04001DB2 RID: 7602
		public bool disableShapeNipL;

		// Token: 0x04001DB3 RID: 7603
		public bool disableShapeNipR;

		// Token: 0x04001DB4 RID: 7604
		public float tearsLv;

		// Token: 0x04001DB5 RID: 7605
		public bool hideEyesHighlight;
	}
}
